﻿using System;

namespace VoxelSystem.VoxelSystem
{
    public enum GridType { Static, DynamicSnap, DynamicNoSnap }
    public enum GridSubdivision { None, Auto }

    public class VS_Settings
    {
        public const float GridDistance = 0.1f;         // Distance between one and another gridpoint

        // Grid definitions
        public GridType GridType = GridType.DynamicSnap;
        public int GridDimensionX = 5;                  // x-Dimension of static grid
        public int GridDimensionY = 5;                  // y-Dimension of static grid
        public int GridDimensionZ = 5;                  // z-Dimension of static grid   
        public GridSubdivision GridSubdivision = GridSubdivision.None;
        public int GridSubdivisionMax = 1;                // Amount of Maximum Subdivision
        
        // Voxel specification 
        public float VoxelNearClip = (float)Math.Sqrt( 3 * (GridDistance*GridDistance) );       // Defines the nearclip-distance of voxel (in this range weight = 1.0f)
                                                                                                // sqrt(3*GridDistance²) = if voxel is in the middle of a gridcube all corners weighted 1.0f
        public float VoxelFarClip = (float)Math.Sqrt( 3 * (GridDistance*GridDistance) ) / (float)Math.PI;    // Smoothed weight-range    
                                                                                                // sqrt(3*GridDistance²)/2 = weight influencing still the half of neighbour gridcube



    }
}
